package com.seckill.redis;

/**
 * 用户登录
 *
 * @author yjw
 */
public class MiaoshaUserKey extends BasePrefix {

    /**
     * 过期时间:1小时
     */
    public static final int TOKEN_EXPIRE = 3600;

    private MiaoshaUserKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }

    private MiaoshaUserKey(String prefix) {
        super(prefix);
    }

    /**
     * 1：缓存登陆token 2：延长用户过期时间
     */
    public static MiaoshaUserKey token = new MiaoshaUserKey(TOKEN_EXPIRE, "token");

    /**
     * 缓存用户信息
     */
    public static MiaoshaUserKey getUserById = new MiaoshaUserKey(TOKEN_EXPIRE, "getUserById_");


}
